﻿using System.Collections.Generic;
using BoldBrick.OneIntranet.HR.Properties;
using BoldBrick.SharePoint.CommonControls.DataObjects.Base;

namespace BoldBrick.OneIntranet.HR.DataObjects.Lists.CandidatesListData.Views
{
	public class CandidateView : BaseView
	{
		public CandidateView()
		{
			this.RowLimit = 10;
			this.XslLink = Settings.Default.List_Candidates_View_Candidate_XslLink;
			this.ContentTypeId = ContentTypes.ContentTypes.CandidateContentType.ID;
			this.DefaultViewForContentType = true;

			this.Query = Settings.Default.List_Candidates_View_Candidate_Query;
		}

		protected override string GetTitleResourceKey()
		{
			return "List_Candiates_View_Candidate_Title";
		}

		protected override string GetPageNameResourceKey()
		{
			return "List_Candiates_View_Candiate_PageName";
		}

		public override List<ListColumn> GetViewColumns()
		{
			List<ListColumn> columns = new List<ListColumn>
			                           	{
			                           		SiteColumns.DocumentTypeLookupColumn,
			                           		SiteColumns.LanguageLookupColumn,
			                           		SiteColumns.CandidateResultColumn,
			                           		SiteColumns.TestTypeLookupColumn,
			                           		SiteColumns.TestResultPointsColumn,
			                           		SiteColumns.TestResultPointsMaxColumn,
			                           		SiteColumns.TestResultPercentageColumn,
			                           		SiteColumns.InterviewerColumn,
			                           		SiteColumns.ReferenceCompanyColumn,
			                           		SiteColumns.ReferenceNameColumn,
			                           		SiteColumns.ReferencePositionColumn,
			                           		SiteColumns.ResultSummaryColumn,

			                           		SharePoint.CommonControls.DataObjects.SiteColumns.AttachmentsColumn,
			                           		SharePoint.CommonControls.DataObjects.SiteColumns.ContentTypeColumn,
			                           		SharePoint.CommonControls.DataObjects.SiteColumns.ContentTypeIdColumn,
			                           		SharePoint.CommonControls.DataObjects.SiteColumns.ModifiedByColumn,
			                           		SharePoint.CommonControls.DataObjects.SiteColumns.ModifiedColumn
			                           	};
			return columns;
		}
	}
}
